<?php

/**
 * Subclass for representing a row from the 'reaction' table.
 *
 *
 *
 * @package lib.model
 */
class Reaction extends BaseReaction
{
	public function save($con = null){
		if($this->isNew()){
			if($this->getVideoRawEmbedCode() || $this->getVideoRawLink()){
				try {
					$video_info = VideoUtils::getVideoInfo($this->getVideoRawEmbedCode(),$this->getVideoRawLink());
					$this->setVideoCode($video_info['code']);
					$this->setVideoType($video_info['type']);
				}catch (sfException $e) {
				}
			}
		}
		//Aantal reacties op een statement cachen ...
		parent::save();
	}

}
